import Vue from 'vue'
import App from './App.vue'
import router from './router'
//Vuex
import store from './store'

import {
  Button, Form, FormItem, Input, MessageBox, Message, Avatar, Dropdown, DropdownMenu, DropdownItem, Menu, Submenu, MenuItem, MenuItemGroup, Scrollbar, Breadcrumb,
  BreadcrumbItem, Tooltip, Table, TableColumn, Select, Option, Pagination, Dialog, Radio, RadioGroup, DatePicker, Tabs, TabPane, Upload, Popover, Loading,Popconfirm
} from 'element-ui';
Vue.use(Button)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Avatar)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
Vue.use(MenuItemGroup);
Vue.use(Scrollbar);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Tooltip);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Select);
Vue.use(Option);
Vue.use(Pagination);
Vue.use(Dialog);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(DatePicker);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Upload);
Vue.use(Popover);
Vue.use(Loading);
Vue.use(Popconfirm);
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$message = Message;

//注册api
import api from './api/api.js';
Vue.prototype.$api = api

// 注册为全局组件
import PageBreadcrumb from '@/components/Breadcrumb'
Vue.component('PageBreadcrumb', PageBreadcrumb)

//时间过滤引入并注册
import formatDate from './utils/formatDate.js'
Vue.prototype.$formatDate = formatDate

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
